package com.fast.common.result;

import lombok.Getter;

/**
 * @Auther: lhy
 * @Date: 2021/11/11 12:48
 * @Mail: 190643201@qq.com
 */
public enum ApiCode {

    SUCCESS(0, "操作成功"),

    ADD_SUCCESS(0, "添加成功"),

    DEL_SUCCESS(0, "删除成功"),

    PUT_SUCCESS(0, "更新成功"),

    GET_SUCCESS(0, "获取成功"),


    FAIL(1, "操作失败"),

    FAIL_NOT_VAlID(10001, "参数验证失败"),

    FAIL_NOT_METHOD(10002, "操作失败"),


    FAIL_MISSING_ARGUMENT(10003, "缺少条件"),

    NO_PERMISSION(10004, "没有权限"),

    PARAM_ERROR(10005, "参数错误");
    @Getter
    private final int code;

    @Getter
    private final String msg;

    ApiCode(int code, String msg) {
        this.code = code;
        this.msg = msg;
    }
}
